<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.hkpickup.jdo.*" %>
<%@ page import="java.util.List" %>

<html>
<body>
<h2>WebSite Entries</h2>

<%
List<WebSiteEntry> entries = WebSiteEntry.getEntries();

if (entries.isEmpty()) {%>
Sorry, no entries.
<%} else {
  for (WebSiteEntry entry : entries) {
    %>
    <div><%= entry.getUrl() %>, <%= entry.isWatching()?"enable":"disable" %> at <%= entry.getLastUpdate() %></div>
    <%
  }
}
%>

<h2>New entry</h2>
<form action="/website" method="post">
	<p>url: <input name="url"></p>
	<p>enable:(1=enable, other disable) <input name="enable"></p>
	<p><input type="submit" value="Submit"></p>
</form>
</body>
</html>
